import request from '@/utils/request'
import qs from "qs"
export default {

    // 分页后根据某字段排序：全部数据
    getListByOder(pageNum,pageSize,sort){
        return request({
            url: '/api-user/user/listByOder',
            method: 'get',
            params: {
                pageNum,
                pageSize,
                sort
            }
        })
    },

    // 根据id查询sss
    getListById(userId) {
        return request({
            url: '/api-user/user/listById',
            method: 'get',
            params: {userId}
        })
    },

    // 筛选查询数据
    getListByUser(pageNum, pageSize, userNumber, userName, userSource, userMsId, userJob, userCreateTime, sort) {
    
      
        return request({
            url: '/api-user/user/getListByUser',
            method: 'get',
            params: { pageNum, pageSize, userNumber, userName, userSource, userMsId, userJob, userCreateTime, sort }
        })
    },

    // 修改数据
    setListById(user){
var data=qs.stringify(user);
return request({

    url:'/api-user/user/updateListById',
    method:'put',
    data
})

    },

    // 根据Id批量修改数据
    setListByIdList(ids,type){
        var data = qs.stringify({ids,type});
        return request({

            url: '/api-user/user/updateList',
            method: 'put',
            data
        })

    },

    // 获取到用户优惠券总计数数据

    getTotal(pageNum, pageSize,userId,userName,userMsId,sort){

         
        return request({
            url: '/api-user/user/getTotal',
            method: 'get',
            params: {pageNum, pageSize,userId,userName,userMsId,sort}
        })
    },

    // 根据ID查询数据和优惠券记录
    getListByIdTwo(userId){
        return request({
            url: '/api-user/user/listByIdTwo',
            method: 'get',
            params: {userId}
        })

    }


}